package zy1219.zy1;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

public class MainApp {
    public static void main(String[] args) throws InvocationTargetException, IllegalAccessException {
        Cat cat = new Cat();
        BeanUtils.setProperty(cat,"name","汤姆");
        BeanUtils.setProperty(cat,"age",3);
        BeanUtils.setProperty(cat,"color","蓝色");
        BeanUtils.setProperty(cat,"sex","公");
        System.out.println(cat);

    }
}
